﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YouDaoNotesCodes.CSharp_highLevel
{
    class ListAndArray
    {
        public void ListToArray()
        { 
            //List转数组：
            List<string> list = new List<string>();
            list.Add("asdf");
            list.Add("asdf");
            list.Add("asdf");
            list.Add("asdf");

            string[] str = list.ToArray();//
        }
        public void ArrayToList()
        {
            //数组转List：
            string[] str = new string[2];
            str[0] = "as";
            str[1] = "sadgf";
            List<string> list = new List<string>(str);//
        }
    }
}
